package com.coffee.core.util;

import com.coffee.core.enums.ExceptionEnum;
import com.coffee.core.exception.BusinessException;
import com.coffee.core.exception.ValidateBusinessException;

public class CheckMobileUtil {
    public static void checkMobile(String mobile) throws BusinessException {
        ValidateBusinessException.assertStringNotBlank(mobile, ExceptionEnum.ERROR_1201);
        boolean isMobile = RegexUtils.checkMobile(mobile);
        ValidateBusinessException.assertTrue(isMobile, ExceptionEnum.ERROR_1218);
    }
}
